package com.bazhua.bazo.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.bazhua.bazo.common.wxapplet.model.WxAccountResponse;
import com.bazhua.bazo.repository.entity.WechatUser;
import com.bazhua.bazo.repository.model.AdminLogin;
import com.bazhua.bazo.repository.model.AdminUpdatePassword;
import com.bazhua.bazo.repository.model.WxUserSearch;
import com.bazhua.bazo.repository.model.result.CommonResult;
import com.bazhua.bazo.repository.model.result.PageListResult;

/**
 * @Author: starmile
 * @Description:
 * @Create: 2021-01-21 0:50
 **/
public interface IWechatUserService extends IService<WechatUser> {

    WechatUser register(WxAccountResponse wxAccountResponse);

    WechatUser updateUser(WechatUser wechatUser, WxAccountResponse wxAccountResponse);

    WechatUser findByOpenId(String openId);

    WechatUser findById(Long id);

    WechatUser updatePhone(String openId, String phone);

    CommonResult updatePassword(AdminUpdatePassword adminUpdatePassword);

    CommonResult login(AdminLogin adminLogin);

    PageListResult page(WxUserSearch wxUserSearch);

    CommonResult setAgent(Long userId);

    CommonResult setAdmin(Long userId);

    CommonResult setUser(Long userId);
}
